#!/user/bin/env python
# -*- coding: utf-8 -*-
# @Software: PyCharm
# @Time : 2022/1/15 14:03
# @Author : ziqi.zhang
# @Version : 
# @Description : Handle处理层，对PO进行操作

from PageObject.BaiduSearch_PO import BaiduSearchPO


class BaiduSearchHandle(object):
    def __init__(self, driver):
        self.driver = driver
        self.BSH = BaiduSearchPO(self.driver)

    def url(self):
        self.BSH.url()  # 输入地址

    def search(self, key):
        self.BSH.search_input().send_keys(key)  # 搜索框输入搜索词

    def search_button(self):
        self.BSH.search_button().click()  # 点击搜按钮

    def result_text(self):
        return self.BSH.result().text  # 拿到需要用来断言的文本
